@extends('web.frame_layout')
<?php $parent_menu = "会员管理";$menu_selected = "已激活会员";?>
<link rel="stylesheet" href="{{asset('web/css/my-recommend.css')}}">
@section('content')

    <div class="m-right-nr">
        <div>
            <h2><span>{{$menu_selected}}</span></h2>
        </div>
        <div class="m-VList">
            <div class="m-VList-title">
                会员列表
                <div>
                    <form action="{{route('web.active-users.list')}}" method="get" id="txjl_search">
                        <input type="text" name="search" placeholder="请输入用户名进行精准查询">
                        <button>搜索</button>
                    </form>
                </div>
            </div>
            <div class="table-responsive">
                <table class="table" rules=rows border="1">
                    <tr>
                        <th>会员编号</th>
                        <th>会员用户名</th>
                        <th>会员等级</th>
                        <th>接点人</th>
                        <th>接点位置</th>
                        <th>推荐人</th>
                        <th>状态</th>
                        <th>注册时间</th>
                        <th>激活方式</th>
                        <th>管理</th>
                    </tr>

                    {{--<tr class="active">--}}
                    {{--<td>A00001</td>--}}
                    {{--<td>蔚蓝</td>--}}
                    {{--<td>三星渠道专员</td>--}}
                    {{--<td>AAAAA</td>--}}
                    {{--<td>A区</td>--}}
                    {{--<td>AAAAA</td>--}}
                    {{--<td>正常</td>--}}
                    {{--<td>2017-5-25</td>--}}
                    {{--<td><a href="###" class="yjh">已激活</a></td>--}}
                    {{--</tr>--}}
                    @foreach($users as $user)
                        <tr class="active">
                            <td>{{$user->no}}</td>
                            <td>{{$user->username}}</td>
                            <td>
                                {{\App\VModels\VVip::vipBySlug($user->vip_slug)->name}}
                            </td>
                            <td>{{$user->nuser->username or "无"}}</td>
                            <td>
                                @if($user->addr == \App\Models\MUser::$ADDR_A)
                                    A区
                                @elseif($user->addr == \App\Models\MUser::$ADDR_B)
                                    B区
                                @endif
                            </td>
                            <td>{{$user->puser->username or "无"}}</td>
                            <td>{{uStatusStr($user->status)}}</td>
                            <td>{{date("Y-m-d",$user->reg_time)}}</td>
                            <td>
                                @if($user->ok_type == 0)
                                    管理员激活
                                @elseif($user->ok_type == 1)
                                    {{uWalletStr(2)}}激活
                                @elseif($user->ok_type == 2)
                                    {{uWalletStr(1)}}+{{uWalletStr(2)}}激活
                                @endif
                            </td>
                            <td>
                                <a href="###" class="yjh">已激活</a>
                            </td>
                        </tr>
                    @endforeach
                </table>
                @include('web.coms.fenye')
            </div>
        </div>
    </div>

@endsection

@section('footer')
@endsection